<template>
	<view class="container">
		<!-- 引导页 -->
		<!-- <view class="intro">本项目已包含uni ui组件，无需import和注册，可直接使用。在代码区键入字母u，即可通过代码助手列出所有可用组件。光标置于组件名称处按F1，即可查看组件文档。</view>
		<text class="intro">详见：</text>
		<uni-link :href="href" :text="href"></uni-link> -->
		<swiper :indicator-dots="true" :autoplay="false" :acceleration="false" :style="'width:'+screenWidth+'px;height: '+screenHeight+'px;'">
			<swiper-item>
				<view class="swiper-item xm-padding-30r" style="">
					<!-- <video :src="$url.apitop+'/video/index.mp4'" style="position: absolute;top: 0;z-index: 1;width: 100%;height: 100%;left: 0rpx;" controls></video> -->
					<image :src="'http://120.76.135.239:9439/xmdata'+'/images/1.jpg'"
						style="position: absolute;top: 0;z-index: -1;width: 100%;height: 100%;left: 0rpx;" mode="aspectFill"></image>
					<view class="index_page" style="z-index: 10;">
						<view class="index5-top"
							style="display: flex;align-items: center;justify-content: space-between;box-sizing: border-box;">
							<view class="" style="color: #FFFFFF;">
								<!-- 网络设置 -->
							</view>
							<view class="" @click="$api.gotoType('tab','../home/home')"
								style="width: 100rpx;height: 60rpx;text-align: center;border: #FFFFFF 2rpx solid;color: #FFFFFF;line-height: 60rpx;border-radius: 20rpx;">
								跳过
							</view>
						</view>
						<view class="xm-flex-c xm-padding-30r xm-justify-center " style="color: #FFFFFF;width: 100%;height: 100%;">
							<view class="" style="margin-top: 200rpx;">
								拾忆app
							</view>
							一款懂你的软件
						</view>
					
					</view>
				</view>
			</swiper-item>
			<swiper-item>
				<view class="swiper-item">
					<image :src="'http://120.76.135.239:9439/xmdata'+'/images/2.jpg'"
						style="position: absolute;top: 0;z-index: -1;width: 100%;height: 100%;" mode="aspectFill"></image>
					<view class="index_page">
						<view class="index5-top"
							style="display: flex;align-items: center;justify-content: space-between;box-sizing: border-box;">
							<view class="" style="color: #FFFFFF;">
								<!-- 网络设置 -->
							</view>
							<view class="" @click="$api.gotoType('tab','../home/home')"
								style="width: 100rpx;height: 60rpx;text-align: center;border: #FFFFFF 2rpx solid;color: #FFFFFF;line-height: 60rpx;border-radius: 20rpx;">
								跳过
							</view>
						</view>
						<view class="xm-flex-c xm-padding-30r xm-justify-center " style="color: #FFFFFF;width: 100%;height: 100%;">
							<view class="" style="margin-top: 200rpx;">
								让每一次的记忆
							</view>
							度存在可以看到的角落
						</view>
					
					</view>
				</view>
			</swiper-item>
			<swiper-item>
				<view class="swiper-item">
					<image :src="'http://120.76.135.239:9439/xmdata'+'/images/3.jpg'"
						style="position: absolute;top: 0;z-index: -1;width: 100%;height: 100%;" mode="aspectFill"></image>
					<view class="index_page">
						<view class="index5-top"
							style="display: flex;align-items: center;justify-content: space-between;box-sizing: border-box;">
							<view class="" style="color: #FFFFFF;">
								<!-- 网络设置 -->
							</view>
							<view class="" @click="$api.gotoType('tab','../home/home')"
								style="width: 100rpx;height: 60rpx;text-align: center;border: #FFFFFF 2rpx solid;color: #FFFFFF;line-height: 60rpx;border-radius: 20rpx;">
								跳过
							</view>
						</view>
						<view class="xm-flex-c xm-padding-30r xm-justify-center " style="text-align: right;color: #FFFFFF;width: 100%;height: 100%;">
							<view class="" style="margin-top: 500rpx;">
								收集每天的点点滴滴
							</view>
							<view class="">
								打造专属与你的专属回忆
							</view>
							<view class="">
								还有遇到不同的人与不同的故事
							</view>
						</view>
						<view class=""
							style="position: absolute;bottom:180rpx;width: 100%;height: 60rpx;line-height: 60rpx;right: 0px;">
							<view class=""
								style="width: 300rpx;height: 60rpx;line-height: 60rpx;margin: auto;text-align: center;color: #FFFFFF;border-radius: 20rpx;background-color: #06d3d6;"
								@click="tohome">
								点击进入使用
							</view>
						</view>

					</view>
				</view>
			</swiper-item>
		</swiper>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// href: 'https://uniapp.dcloud.io/component/README?id=uniui'
				id:undefined,
				screenHeight:undefined,
				screenWidth:undefined
			}
		},
		onLoad() {
			var that = this
			uni.getStorage({
				key:"typeHome",
				success(data) {
					if(data.data==-1){
						uni.setStorage({
							key:"typeHome",
							data:1
						})
						that.id = 1
					}else{
						that.$api.gotoType("tab",'../home/home')
					}
				}
			})
			uni.getSystemInfo({
			    success: function (res) {
					console.log(res);
			        // console.log(res.model);
			        // console.log(res.pixelRatio);
			        // console.log(res.windowWidth);
			        // console.log(res.windowHeight);
			        // console.log(res.language);
			        // console.log(res.version);
			        // console.log(res.platform);
					that.screenHeight = res.screenHeight
					that.screenWidth = res.screenWidth
			    }
			});
			
		},
		methods: {
			tohome() {
				console.log("asd");
				uni.switchTab({
					url: '../home/home'
				})
			}
		}
	}
</script>

<style>
	page {
		background-color: #999999;
	}

	.container {
		box-sizing: border-box;
	}

	swiper {
		width: 375px;
		height: 667px;
	}

	.index_page {
		padding: 40px;
	}
</style>
